//
// Created by fanghr on 18-3-27.
//

#include "../include/acclsen_driver2cpp.h"

acclsen_driver2cpp::acclsen_driver2cpp(std::string path, int baud) {
    sensor = acclsen_driver::acclsen_init(path, baud);
    if (sensor = nullptr)
        throw nullptr;
}

acclsen_driver2cpp::~acclsen_driver2cpp() {
    acclsen_destory(sensor);
}

void acclsen_driver2cpp::run() {
    acclsen_run(sensor);
}

void acclsen_driver2cpp::stop() {
    acclsen_stop(sensor);
}

acclsen_recv::time acclsen_driver2cpp::get_time() {
    return acclsen_driver::get_time(sensor);
}

acclsen_recv::acc acclsen_driver2cpp::get_acc() {
    return acclsen_driver::get_acc(sensor);
}

acclsen_recv::angsp acclsen_driver2cpp::get_angsp() {
    return acclsen_driver::get_angsp(sensor);
}

acclsen_recv::ang acclsen_driver2cpp::get_ang() {
    return acclsen_driver::get_ang(sensor);
}

acclsen_recv::magf acclsen_driver2cpp::get_magf() {
    return acclsen_driver::get_magf(sensor);
}

acclsen_recv::port acclsen_driver2cpp::get_port() {
    return acclsen_driver::get_port(sensor);
}

acclsen_recv::prehei acclsen_driver2cpp::get_prehei() {
    return acclsen_driver::get_prehei(sensor);
}

acclsen_recv::latlon acclsen_driver2cpp::get_latlon() {
    return acclsen_driver::get_latlon(sensor);
}

acclsen_recv::grsp acclsen_driver2cpp::get_grsp() {
    return acclsen_driver::get_grsp(sensor);
}

acclsen_recv::foel acclsen_driver2cpp::get_foel() {
    return acclsen_driver::get_foel(sensor);
}
